=========================================================================== BBS: The Abacus * HST/DS * Potterville, MI Date: 02-11-93 (18:40) Number: 6 From: JOHN GALLAS Refer#: NONE To: JAMES ZMIJEWSKI Recvd: NO Subj: SOUND BLASTER 2/2 Conf: (35) Quick Basi --------------------------------------------------------------------------- >>> Continued from previous message SUB WriteReg (Reg%, Value%) ' Purpose: Writes to any of the SB/AdLib's registers ' Variables: Reg%: Register number, ' Value%: Value to insert in register ' (Note: The registers are from 00-F5 (hex)) OUT &H388, Reg '388h = address/status port, 389h = data port FOR x = 0 TO 5 ' This tells the SB what register we want to write to A = INP(&H388) ' After we write to the address port we must wait 3.3ms NEXT x OUT &H389, Value ' Send the value for the register to 389h FOR x = 0 TO 34 ' Here we must also wait, this time 23ms A = INP(&H388) NEXT x END SUB ---------------------------------------------------- That program will produce a motorcycle engine effect. I do have code that will play a frequency (from 0 to 800 I believe) on any of 11 octaves, and I'm waiting for the authors permission to post it. By the way, we've had quite a few people with names that have been tough to pronounce in the past few weeks, but yours tops them all! Can ya give me a hint? It looks like Zem-ij-ew-sky - am I close? * OLX 2.1 TD * Connection Attempt #172 .....CONNECT 300... --- TMail v1.30.4 * Origin: TC-AMS MLTBBS 2.2 - Minnetonka, MN (612)-938-4799 (1:282/7) SEEN-BY: 1/211 11/2 4 13/13 101/1 108/89 109/25 110/69 114/5 123/19 124/1 SEEN-BY: 153/752 154/40 77 157/2 159/100 125 430 950 203/23 209/209 280/1 SEEN-BY: 390/1 396/1 15 397/2 2230/100 3603/20